const spacesManage = {
    state: {
        spInfo: JSON.parse(window.sessionStorage.getItem("spInfo") || '{}'), //安装点信息保存
        warn: JSON.parse(window.sessionStorage.getItem("warn") || '{}'), //处理详情
        organization: JSON.parse(window.sessionStorage.getItem("organization") || '{}'), //组织详情
        organizationInfo: JSON.parse(window.sessionStorage.getItem("organizationInfo") || '{}'), //组织信息
    },

    mutations: {
        saveSpInfo(state, spInfo) {
            state.spInfo = spInfo;
            window.sessionStorage.setItem("spInfo", JSON.stringify(spInfo))
        },
        saveOrg(state, organization) {
            state.organization = organization;
            window.sessionStorage.setItem("organization", JSON.stringify(organization))
        },
        saveOrganizationInfo(state, organizationInfo) {
            state.organizationInfo = organizationInfo;
            window.sessionStorage.setItem("organizationInfo", JSON.stringify(organizationInfo))
        },
        saveWarn(state, warn) {
            state.warn = warn;
            window.sessionStorage.setItem("warn", JSON.stringify(warn))
        },
    },
    actions: {

    },
};

export default spacesManage;